package cn.itcast.mq.listener;

import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;

@Component
public class ConsumerBasicAMQPTest {

    /**
     * 监听指定的队列queue，从里面取值
     * @param msg
     */
    @RabbitListener(queues = "simple.queue")
    public void listenSimpleQueueMessage(String msg) {
        System.out.println("接收的消息【"+msg+"】");
    }
}
